package deepbitview


class MtgoxTradingBotJob {

    MtgoxTradingBotService mtgoxTradingBotService
    /**
     * this trigger defines that this method will be executed all 10 minutes after an initial 60 second delay
     */

    static triggers = {
        //fires it once a minute
        simple name: 'tradingTrigger', startDelay: 60000, repeatInterval: 60000
    }

    def execute() {
        if (MtGoxAccessHandler.isConfigured()) {
            //we want 1% trading increases
            mtgoxTradingBotService.intializeRelativeOrderSet(0.5);
        }
        else{
            log.info "no wallet configured yet!"
        }
    }
}
